function id(id) {
	return document.getElementById(id);
}

function name(name) {
	return document.getElementsByName(name);
}

function checkLogin() {
	username = id("username");
	passwd = id("passwd");
	isRight = true;
	
	if (username.value == "") {
		alert("用户名不能为空！");
		username.focus();
		isRignt = false;
	}
	if (passwd.value == "") {
		alert("密码不能为空！");
		passwd.focus();
		isRight = false;
	}
	return isRight;
}